package com.zzty.txj.entity;

import java.util.Date;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang.StringUtils;

public class Daily {
    private Integer id;
    private String name;
    private double money;
    private String startTime;
    private String stopTime;
    private String location;
private  String checkLocation;

    public String getCheckLocation() {
        return checkLocation;
    }

    public void setCheckLocation(String checkLocation) {
        this.checkLocation = checkLocation;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getStopTime() {
        return stopTime;
    }

    public void setStopTime(String stopTime) {
        this.stopTime = stopTime;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    @Override
    public String toString() {
        return "Daily{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", money=" + money +
                ", startTime='" + startTime + '\'' +
                ", stopTime='" + stopTime + '\'' +
                ", location='" + location + '\'' +
                ", checkLocation='" + checkLocation + '\'' +
                '}';
    }

    public String toJsonString(){
        JSONObject daily = new JSONObject();
        if(!StringUtils.isEmpty(this.name)){
            daily.put("name", this.name);
        }

        if(this.id!=null){
            daily.put("id", this.id);
        }


        return daily.toString();
    }
}
